﻿using Application.DTO;
using Application.DTO.Permission;
using Domain.Entity.Permission;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.IService.Permission
{
    public interface IPermissionService : IBaseService<PermissionInfo>
    {

        /// <summary>
        /// //查询权限及该子级权限
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ResultDTO<List<PermissionTreeDTO>> GetPermissionInfo(int Pid);

        /// <summary>
        /// 权限的显示+分页+查询
        /// </summary>
        /// <param name="PermissionInfoName"></param>
        /// <param name="Pagesize"></param>
        /// <param name="Pageindex"></param>
        /// <returns></returns>
        public Task<PageDTO<PermissionInfoDTO>> PermissionInfoShow( int Pagesize, int Pageindex, string PermissionInfoName);

        /// <summary>
        /// 逻辑删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public  Task<ResultDTO<string>> PermissionDel(int id);



        /// <summary>
        /// 权限添加
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        public Task<ResultDTO<string>> PermissionAdd(PermissionAddDto dto);

        /// <summary>
        /// 权限修改
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        public  Task<ResultDTO<string>> PermissionInfoDTO(PermissionAddDto dto);


        /// <summary>
        /// 真.权限删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public Task<ResultDTO<string>> Delete(int id);


        /// <summary>
        /// 获取菜单权限
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <returns></returns>
        public Task<ResultDTO<List<MenuDTO>>> GetMenus(int userId);


        /// <summary>
        /// 权限的倒序显示+分页+查询
        /// </summary>
        /// <param name="PermissionInfoName"></param>
        /// <param name="Pagesize"></param>
        /// <param name="Pageindex"></param>
        /// <returns></returns>
        public Task<PageDTO<PermissionInfoDTO>> ReverseOrderShow(int Pagesize, int Pageindex, string PermissionInfoName);



     

        /// <summary>
        /// 权限的批量逻辑删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public Task<ResultDTO<string>> PermissionsSoftDelAll(string idList);




    }

   

}
